import 'package:json_annotation/json_annotation.dart';

part 'shop_category.g.dart';

@JsonSerializable()
class ShopCategory extends Object {
  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'avatar')
  String avatar;

  @JsonKey(name: 'parent_id')
  int parentId;

  ShopCategory(
    this.id,
    this.name,
    this.avatar,
    this.parentId,
  );

  factory ShopCategory.fromJson(Map<String, dynamic> srcJson) =>
      _$ShopCategoryFromJson(srcJson);
}
